package com.example.PDFdemo.pdf;

import com.itextpdf.text.Document;
import com.itextpdf.text.pdf.PdfWriter;

import java.io.FileOutputStream;

public class Test2 {
    public static void main(String[] args) throws Exception {
        String oldFile = "C:\\Users\\admin\\Desktop\\test1.pdf";
        String newFile = "C:\\Users\\admin\\Desktop\\test2.pdf";
        Document doc = new Document();
        PdfWriter writer = PdfWriter.getInstance(doc, new FileOutputStream(newFile));
    }
}
